package com.djf.springaidemo.tools;

import org.springframework.ai.tool.annotation.Tool;
import org.springframework.context.annotation.Configuration;

import java.util.HashMap;
import java.util.Map;

/**
 * @Author 26393
 * @Date 2025/5/4 1:04
 * @Version 1.0
 */
@Configuration
public class CsTools {

    @Tool(description = "取消预定")
    public String cancelBooking(String bookingId, String customerName) {
        return String.format("预订号 %s 的订单已成功取消，客户：%s。", bookingId, customerName);
    }

    @Tool(description = "查询预订详情")
    public Map<String, Object> getBookingDetails(String bookingId) {
        Map<String, Object> result = new HashMap<>();
        result.put("bookingId", bookingId);
        result.put("status", "confirmed");
        result.put("price", 1200.00);
        return result;
    }


}
